package com.example.springblog.model;

import com.example.springblog.utils.DateUtils;
import lombok.Data;

import java.util.Date;

@Data
public class BlogInfo {
    //`id` INT NOT NULL AUTO_INCREMENT,
    //`title` VARCHAR(200) NULL,
    //`content` TEXT NULL,
    //`user_id` INT(11) NULL,
    //`delete_flag` TINYINT(4) NULL DEFAULT 0,
    //`create_time` DATETIME DEFAULT now(),
    //`update_time` DATETIME DEFAULT now(),
    private Integer id;
    private String title;
    private String content;
    private Integer userId;
    private Integer deleteFlag;
    private Date createTime;
    private Date updateTime;

    public String getCreateTime() {
        return DateUtils.formatDate(createTime);
    }
}
